home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Scene Storm
/
Scene Storm - Volume 1.iso
/
coding
/
c
/
unix
/
src
/
read.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-07-19
|
302b
|
17 lines
#include "amiga.h"
#include "files.h"
#include <fcntl.h>
int read(int fd, void *buffer, unsigned int length)
{
struct fileinfo *fi;
chkabort();
if (fi = _find_fd(fd))
{
if (fi->flags & FI_READ) return fi->read(fi->userinfo, buffer, length);
errno = EACCES;
}
return -1;
}